<?php
if($_POST["page"]){
require '../include/library.inc.php';


if($_POST["page"] && !file_exists( './tamplates/'.$_POST["page"].'.ajax.php' ) && $_POST["page"] != 'plan')
			{
				
				$sql = "SELECT 
							tamplate,
							query 
						FROM sef_url
						WHERE 
						sef_url = '".escape($_POST["page"])."' 
						AND lang_id = '".$_SESSION['lang_id']."' 
						";

				$result = query($sql);

				if($row = mysql_fetch_object($result) ){
					 
					 $tmp = $row->tamplate;
				     $query = $row->query;
				}
				
			}

if(file_exists( './tamplates/'.$_POST["page"].'.ajax.php' )) $tmp =  $_POST["page"];

require 'tamplates/'.$tmp.'.ajax.php';
}



?>